home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
asm32.zip
/
E32.ZIP
/
SCRNCOLS.ASM
< prev
next >
Wrap
Assembly Source File
|
1996-03-30
|
2KB
|
103 lines
; SCRNCOLS.ASM for E32 - Copyright (C) 1994 - 1996 Douglas Herr
; all rights reserved
; change screen columns on most systems
; 01/18/1996 DH: changed PICKSTR calls to PICKSTRING
include model.inc
public screen_columns
extrn set_screen_dimensions:near
extrn htext:near, hram8043:near, hram9025:near, hram9043:near
extrn cursoroff:near, getcrt:near
extrn $tpick:near, pickstring:near
extrn get_screen_data:near
include dataseg.inc
extrn rows:word, columns:byte
coldata dw 40
dw 80
dw 132
herc_dispatch dd hram8043
dd hram9043
dd htext
dd hram9025
hercmsg db '80 columns',0
db '90 columns',0
db 0
ega_msg db '40 columns',0
evmono db '80 columns',0
ega132 db '132 columns',0
db 0
egamono dw 0
@curseg ends
include codeseg.inc
screen_columns proc near
push word ptr ega132
call cursoroff
call getcrt
mov byte ptr egamono,ah
xor ebx,ebx
mov dx,0707h
cmp al,0FFh ; CGA?
je short cga
cmp al,128 ; RamFont?
ja short herc
cmp al,1
je short evga
cmp al,3
je short evga
; cmp ax,0100h
; jne short exit
; EGA monochrome OK if Everex
; lea si,evmono
; cmp ax,0102h ; is it everex?
; jne short exit
jmp short exit
; inc egamono
; jmp short ev1
evga:
lea esi,ega_msg
ev1: mov ebx,1
mov eax,offset @curseg:$tpick
call pickstring
cmp al,27
je short exit
add bx,egamono
mov bx,coldata[ebx*2]
mov ax,rows
add ax,2
call set_screen_dimensions
jmp short screen_data
cga: mov ega132,0 ; disable 132-column display
jmp short evga
herc: lea esi,hercmsg
mov eax,offset @curseg:$tpick
call pickstring
cmp ax,27
je short exit
; shl ebx,2
cmp rows,40
sbb eax,eax ; AX = 0FFFFh if 25 rows
and eax,8
; add ebx,eax
call herc_dispatch[eax+ebx*4]
screen_data:
call get_screen_data
exit:
pop word ptr ega132
clc
ret
screen_columns endp
@curseg ends
end